home *** CD-ROM | disk | FTP | other *** search
/ Amiga Mag HDD Backup / Amiga Mag HDD Backup.zip / Amiga Mag HDD Backup / Alexander.img.bin / Alexander.img / 315 2 files Archive.sit / Any plain-text files / ? Any plain-text file 75 < prev    next >
Text File  |  1995-01-03  |  4KB  |  83 lines

  1. ndTime        = BarData.Stop.Bars  * BarData.Measure    ,
  2.                   + BarData.Stop.Clocks
  3.  
  4. (Note:  In ARexx, a comma means "continued on the next line."  If you can
  5. fit each command on one line -- not possible on this magazine page -- then
  6. you must omit the commas.)
  7.  
  8.     Next, we prepare to scan the region.  Just for fun, while the
  9. script is working, we change the pointer to the "sleeping cloud" to
  10. indicate work is being done.
  11.  
  12.     23    MXPointer "SLEEPY"
  13.     24    Event. = ""        /* Initialize Event variable */
  14.     25    BeginScan
  15.  
  16.     Since we are adding pitch bend events, we can fill in some of
  17. the Event variable fields that will remain constant:  the event type,
  18. the MIDI channel, and an event value (we choose +8192, which is zero
  19. pitch bend).
  20.  
  21.     26    Event.Type    = "PBEN"
  22.     27    Event.Channel    = midiChannel
  23.     28    Event.Num    = 8192
  24.  
  25.     Finally, it is time to add pitch bend events!  To add them at the
  26. right locations, we must calculate the Bar and Clock numbers where they
  27. should be added.  The bar number is obtained using integer division (the
  28. "%" operator), and the clock number using the "mod" or "remainder" function
  29. (the "//" operator):
  30.  
  31.     29    DO WHILE currentTime <= endTime
  32.     30        Event.Start.Bars   = currentTime %  BarData.Measure
  33.     31        Event.Start.Clocks = currentTime // BarData.Measure
  34.     32        AddEvent
  35.     33        currentTime        = currentTime + spacing
  36.     34    END
  37.  
  38. When the loop is done, clean up and exit.
  39.  
  40.     35    EndScan
  41.     36    MXPointer "NORMAL"
  42.  
  43.     Save lines 1-36 in a file called "PitchBend.mxe". To use this
  44. script, first mark a region or select some events.  Second, run the
  45. PitchBend.mxe script.  Third, use the Sculpt Tool to shape the pitch bend
  46. events the way you want them. Enjoy!
  47.  
  48.     Note:  RexxEdit has a bug concerning marked regions.  If a region
  49. appears to be marked, but you keep getting the requestor "No region is
  50. marked/selected," try marking the region again or using the Select tool
  51. instead of Mark.  (See "TECH TALK" below for more information.)
  52.  
  53.     Another note:  the above assumes you are using "relative time"
  54. sequences, not "absolute time" sequences.  If you use absolute time
  55. sequences, then time is measured in quarter frames instead of clocks;
  56. see the manual for more information.
  57.  
  58.  
  59. COMMUNICATING WITH OTHER PROGRAMS
  60.  
  61.     Using the ARexx "ADDRESS" command, Music-X scripts can talk to
  62. other ARexx-compatible products such as Deluxe Music 2.0, Bars and Pipes
  63. Professional, One Stop Music Shop, and even non-music products.  How about
  64. using SuperBase Professional to store your Music-X sequences?  VLT for
  65. uploading and downloading sequences?  AmigaVision for multimedia?  The
  66. possibilities are numerous and exciting.
  67.  
  68.     Communicating with another program has 4 steps.
  69.  
  70.     1. Find out the ARexx port names of the other program, by
  71.        consulting its documentation.
  72.  
  73.     2. Store Music-X's port name in a variable for safekeeping,
  74.        using the Address() command.  (See "TECH TALK", below,
  75.        if you are interested in the reason.)
  76.  
  77.     3. Use the Show("P") command to make sure that the other programs
  78.        are running.  If not, then your script run them, using the
  79.        "WaitForPort" command to waiII*Æ@Ç P8$
  80. äBaP╕d6êDbQ8ñV-îFcQ╕Σv=ÉHdR9$ûM'öJeR╣d╢]/ÿLfS9ñ╓m7£NgS╣Σ÷}?áPhT:%ìGñRiT║e6¥O¿TjU:ÑV¡W¼VkU║σv╜_░XlV;%û═g┤ZmV╗e╢▌o╕\nW;Ñ╓φw╝^oW╗┤Ç P8$
  81. äBaP╕d6êDbQ8ñV-îFcQ╕Σv=ÉHdR9$ûM'öJeR╣d╢]/ÿLfS9ñ╓m7£NgS╣Σ÷}?áPhT:%ìGñRiT║e6¥O¿TjU:ÑV¡W¼VkU║σv╜_░XlV;%û═g┤ZmV╗e╢▌o╕\nW;Ñ╓φw╝^oW╗┤Ç P8$
  82. äBaP╕d6êDbQ8ñV-îFcQ╕Σv=ÉHdR9$ûM'öJeR╣d╢]/ÿLfS9ñ╓m7£NgS╣Σ÷}?áPhT:%ìGñRiT║e6¥O¿TjU:ÑV¡W¼VkU║σv╜_░XlV;%û═g┤ZmV╗e╢▌o╕\nW;Ñ╓φw╝^oW╗┤Ç P8$
  83. äBaP╕d6êDbQ8ñV-îFcQ╕Σv=ÉHdR9$ûM'öJeR╣d╢]/ÿLfS9ñ╓m7£NgS╣Σ÷}?áPhT:%